package chouxiang类;
interface IShape {
	public static final int age=10;
	public abstract void draw();
	//接口里面的方法修饰符是默认的
}
abstract  class A {
	int age=10;
	//我可以有自己成员的变量
	public abstract void print();
	public void func() {
		System.out.println("我自己还有不抽象的");
	}
}
abstract class C extends A {
	public abstract void test();
}
class D extends C {
	@Override
	public void print() {
		System.out.println("逃不过去，都得重写");
	}
	@Override
	public void test() {
	}
}
class B extends A {
	@Override
	public void print() {
		System.out.println("抽象类就是被用来继承的");
	}
	public void print2() {
		System.out.println("这是我子类自己的");
	}
}
class Rect implements IShape{
	public  void draw() {
		System.out.println("矩形");
	}
}
class Flower implements IShape{
	public void draw() {
		System.out.println("❀");
	}
}
public class test {
	public static void drawMap (IShape ishape) {
		ishape.draw();
	}
	public static void main(String[] args) {

		IShape iShape1=new Rect();
		IShape iShape2=new Flower();
		drawMap(iShape1);
		drawMap(iShape2);
	}
}
